package cn.kgc.vue.shiro;

import jakarta.servlet.ServletRequest;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author 课工场
 * @date 2024/9/23
 * @description
 */
public class JWTToken implements AuthenticationToken {

    private String token;

    private ServletRequest servletRequest;

    public JWTToken(String token,ServletRequest servletRequest){
        this.token = token;
        this.servletRequest = servletRequest;
    }
    // 获取身份信息
    @Override
    public Object getPrincipal() {
        return token;
    }

    // 获取身份信息 获取凭证信息
    @Override
    public Object getCredentials() {
        return token;
    }


    public ServletRequest getServletRequest(){
        return this.servletRequest;
    }
}
